home *** CD-ROM | disk | FTP | other *** search
- Brief description of 4xFORTH Status Commands
-
-
- Overview
- --------
- A number of commands are available which print information
- about the current state of the 4xFORTH system. Among them
- are:
-
- WHERE or W
- BUFFERS or B
- ORDER
- .S
- VLIST
-
- WHERE or W<cr>
- -------------
- Prints a status report on the screen which gives a substantial
- amount of information about the current state of the 4xFORTH
- system. It is fairly self-explanatory.
-
-
- BUFFERS or B<cr>
- ----------------
- Prints the contents of the system mass storage buffer table.
- The information for a single buffer table entry in printed
- per line. The cell after the ":" in a line is the actual
- address of the 1024 byte buffer which may contain a block
- from the mass storage device. The second element is the
- current block number from which the data in the buffer came.
- The value -1 in this cell indicates that this buffer is
- empty. The last cell in the line contains the value in the
- update/lock word for the buffer. A value of 0 indicates that
- the buffer has not been updated and is not locked to a specific
- task or user. A value other than 0 or -1 in this cell can be
- construed as the address of the user table of the user that
- has locked this buffer.
-
-
- ORDER
- -----
- 4xFORTH uses "only" concept vocabularies. A complete explanation
- of the approach can be found in the Experimental Proposals section
- of the 83 FORTH Standard or in the real 4xFORTH documentation. The
- "only" concept allows the user to view the name of the vocabulary
- in which compilation is currently taking place, and the names of the
- vocabularies that are currently being searched during compilation or
- finding of definitions and variables. This is a MAJOR improvement
- in allowing the programmer to know what he is actually doing.
-
- The definition ORDER prints the current compilation and searched
- vocabularies by name.
-
-
- .S
- ----
-
- This is a nondestructive print of the stack in top down order. It can
- be executed from the keyboard or placed in programs as a snapshot to
- show the state of things. The print is done top elements over those
- underneath rather than from left to right. There are arguments in
- favor of either approach, if you don't like this one ... make your
- own.
-
-
-
- VLIST
- -----
- The actual vocabulary structure used by 4xFORTH is simple. It
- is designed to allow searches to occur with utmost speed. Every
- vocabulary has a table associated with it. The table contains
- a pointer to the vocabulary name string, a base address for the
- threads in the vocabulary, and 16 thread pointers.
-
- The search algorithm actually uses only one of the thread pointers.
- The thread into which a new definition is placed is based on the
- low 4 bits of the first character. Thus, you will find all of the
- definitions beginning with W in the same thread.
-
- VLIST is the utility which allows the contents of a vocabulary to be
- printed. It requires the base address of table that defines the
- vocabulary, and it prints the contents thread by thread. The call is:
-
- <vocabulary table base address> VLIST <cr>
-
- In practice, the vocabulary table base address is gotten from the
- structures comprising the "only" vocabulary pointers for the CURRENT
- compilation vocabulary and the search order. Some examples:
-
-
- Comilation Vocabulary
- -----------------------------------------------------
- CURRENT @ VLIST <cr>
-
-
- Search Order
- -----------------------------------------------------
- first element CONTEXT @ @ VLIST <cr>
- second element CONTEXT @ 4 + @ VLIST <cr>
- third element CONTEXT @ 8 + @ VLIST <cr>
- and so on ...
-
-
-
-
- ə